package com.thf.controller;


import com.thf.model.CommonResult;
import com.thf.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/auth")
public class AuthController {

    @Autowired
    private AuthService authService;

    /**
     * 远程权限验证
     * @param uri
     * @param username
     * @return
     */
    @GetMapping("/checkAccessToUri")
    public CommonResult checkAccessToUri(@RequestParam String uri, @RequestParam String username){
        return authService.checkAccessToUri(uri,username);
    }

}